home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / wgsave11.zip / SCRNSAVE.DOC < prev    next >
Text File  |  1993-07-13  |  3KB  |  77 lines

  1. Version 1.1, 13-JUL-93
  2. ----------------------
  3.  
  4. Here are some simple screen savers for TURBO VISION (TP 7.0 ) programs.
  5. Users need to cut and paste a couple of lines from the demo
  6. programs SCRNSAV1.PAS, SCRNSAV2.PAS or SCRNSAV3.PAS to methods Init,
  7. GetEvent, HandleEvent and Idle of their TURBO VISION application.
  8. Or they might use unit SCRNSAVE.PAS  to derive their own
  9. TApplication object (see demo TESTSCRN.PAS).
  10.  
  11. The main purpose is to show how to implement the invoke/cancel
  12. mechanism into TV programs. There is nothing fancy about the
  13. actual screen saver part in these demos (no graphics, no sound,
  14. no mickey mouse). The screen saver routine will put a small text
  15. every <interval> seconds on the screen at varying positions and
  16. with different colors. This text, start up delay and period
  17. are programmable constants.
  18.  
  19.  
  20.  SCRNSAV1.PAS disables the TV event mechanism and polls the keyboard.
  21.  
  22.  SCRNSAV2.PAS does not block TV events but enhances the GetEvent method
  23.  to start/stop the screen saver. For instance, moving the mouse will revoke
  24.  the hibernating program.
  25.  
  26.  SCNRSAV3.PAS shows how to use the screen saver of SCRNSAV2.PAS in
  27.  case a subview generates events with its own GetEvent method.
  28.  
  29.  SCRNSAVE.PAS is a complete unit creating a derived TApplication
  30.  object which can be USED by your application. See TESTSCRN.PAS.
  31.  
  32.  
  33. Browse the demo programs for more information.
  34.  
  35.  
  36. History:
  37.   Vs. 1.0  first draft
  38.   Vs. 1.1  some bug fixes, SCRNSAV3.PAS, SCRNSAVE.PAS, TESTSCRN.PAS added
  39.  
  40.  
  41. ---------------------------------------------------------------------
  42. Credits:
  43.   Rutger van de GeVEL, rutger@kub.nl
  44.      -  unit SCRNSAVE.PAS, some bug fixes and improvements
  45.  
  46. From his mail:
  47.  
  48. The unit ScrnSave implements a simple screensaver in Turbo/Borland
  49. Pascal's (Version >= 6.0) Turbo Vision (Version >= 1.0). To create your
  50. own application with the screensaver simply include the SCRNSAVE unit in
  51. the USES statement, derive an object from TScreenSaverApp and specify the
  52. time after which the screensaver will kick in. You have to override
  53. the procedure TScreenSaverApp.ScreenSaver. That's all. I have provided a
  54. small example TESTSCRN.PAS to demonstrate its use.
  55.  
  56.  
  57. Removed bugs and improvements are:
  58. 1) The screensaver has been 'converted' to a unit.
  59. 2) The function Time: LongInt had to be modified because it didn't
  60.    function correctly: some of the results of intermediate calculations
  61.    had to be type-casted.
  62. 3) The screensaver is now midnight proof by adding 'ABS (...)' in procedure
  63.    TScreenSaverApp.GetEvent (Var Event: TEvent) and in procedure
  64.    TScreenSaverApp.Idle.
  65. 4) The screensaver can be disabled by setting SleepTime:= 0.
  66. 5) Added the Randomize procedure in TScreenSaverApp.Init.
  67. 6) Procedure TScreenSaverApp.ScreenSaver should ALWAYS be overriden.
  68. -----------------------------------------------------------------------
  69.  
  70.  
  71. Wolfgang Gross
  72. ------------------------------------------------------------------------
  73. Dr. W. Gross, Abt. f. Exp. Chirurgie, Uniklinik Heidelberg, Germany
  74. gross@aecds.exchi.uni-heidelberg.de
  75. ------------------------------------------------------------------------
  76.  
  77.